var aui = require("../lib/node");
var chai = require("chai");
var expect = chai.expect;

describe('aui', function(){
  describe('#utils.chartoUnicode()', function(){
    it('should return a string', function(){
        expect(aui.utils.chartoUnicode("汉字")).to.be.a('string');
    })
  })
  describe('#utils.deepAssign()', function(){
    it('should return a string', function(){
      let a = {b: {c: 1}};
      let b = {b: {e: 1}};
      let c = aui.utils.deepAssign(a, b);
      expect(c.b.e).to.be.equal(1);
    })
  })
  describe('#utils.transformStylelikeExp()', function(){
    it('should return a obj pairs', function(){
      let str = 'translateX:100;';
      let res = aui.utils.transformStylelikeExp(str);
      expect(res[0][0]).to.be.equal('translateX');
    })
  })
})